package com.itlong.cloud.property.service;

import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoGetPageDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoSaveDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoUpdateDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaSetEnableDTO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaInfoGetVO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaInfoVO;
import com.itlong.cloud.utils.page.Page;

/**
 * <desc>
 *      多媒体设备信息处理接口.
 * </desc>
 *
 * @createDate 2017-10-19
 */
public interface IDeviceMediaInfoService {

    /**
     * <desc>
     *     一键启用/禁用设备多媒体信息【根据多媒体Id列表】
     * </desc>
     *
     * @param deviceMediaSetEnableDTO  一键启用/禁用多媒体信息参数对象
     * @return 受影响的行数
     * @author Lix
     * @createDate 2017-10-20
     */
    Integer setMediaInfoEnable(DeviceMediaSetEnableDTO deviceMediaSetEnableDTO) throws Exception;


    /**
     * <desc>
     *      分页查询设备多媒体信息
     * </desc>
     *
     * @param deviceMediaInfoGetPageDTO 分页查询设备多媒体信息数据传输对象
     * @return 分页查询结果对象
     * @author Lix
     * @createDate 2017-10-20
     */
    Page<DeviceMediaInfoVO> getMediaInfoByPage(DeviceMediaInfoGetPageDTO deviceMediaInfoGetPageDTO) throws Exception;

    /**
     * <desc>
     *      保存单个多媒体资源
     * </desc>
     *
     * @param deviceMediaInfoSaveDTO 保存多媒体资源数据传输对象
     * @return 受影响的行数
     * @throws Exception
     * @author wangzhi
     * @createDate 2018-3-28
     */
    Integer saveDeviceMediaInfo(DeviceMediaInfoSaveDTO deviceMediaInfoSaveDTO) throws Exception;

    /**
     * <desc>
     *     获取单个设备多媒体信息
     * </desc>
     *
     * @param mediaId 多媒体id
     * @return 单个设备多媒体信息结果对象
     * @author wangzhi
     * @createDate 2018-03-28
     */
    DeviceMediaInfoGetVO getOneMediaInfo(String mediaId);

    /**
     * <desc>
     *      修改单个多媒体资源
     * </desc>
     *
     * @param deviceMediaInfoUpdateDTO 修改多媒体资源数据传输对象
     * @return 受影响的行数
     * @throws Exception
     * @author wangzhi
     * @createDate 2018-3-28
     */
    Integer updateDeviceMediaInfo(DeviceMediaInfoUpdateDTO deviceMediaInfoUpdateDTO) throws Exception;

    /**
     * <desc>
     *      发布多媒体资源，支持批量
     * </desc>
     *
     * @param mediaIds 多媒体资源id字符串
     * @return 影响的行数
     * @author wangzhi
     * @createDate 2018-04-09
     */
    Integer publishMedias(String mediaIds) throws Exception;

    /**
     * <desc>
     *      修改已过期多媒体资源的发布状态
     * </desc>
     *
     * @return 是否修改成功
     * @author wangzhi
     * @createDate 2018-04-10
     */
    boolean checkAndChangeOverMediaPublishStatusTask() throws Exception;

    /**
     * <desc>
     *      兼容旧多媒体数据接口
     * </desc>
     *
     * @return
     * @author wangzhi
     * @createDate 2018-04-19
     */
    Integer compatibilityOldMediaData() throws Exception;

    /**
     * <desc>
     *      修复本人因失误造成的错误数据
     * </desc>
     *
     * @return
     * @author wangzhi
     * @createDate 2018-04-20
     */
    Integer repairWrongData() throws Exception;

    /**
     * <desc>
     *      设备广告审核通过
     * </desc>
     *
     * @param deviceMediaSetEnableDTO 设备广告参数DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/12/25
     */
    Integer audit(DeviceMediaSetEnableDTO deviceMediaSetEnableDTO) throws Exception;

}
